//
//  HMSportMainViewController.m
//  HeiMaXing
//
//  Created by 黄跃奇 on 16/10/21.
//  Copyright © 2016年 itheima. All rights reserved.
//

#import "HMSportMainViewController.h"
#import "HMSportSportingViewController.h"
#import "HMSportTracking.h"

@interface HMSportMainViewController ()

@end

@implementation HMSportMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}

//开始运动
- (IBAction)clickStartSport:(UIButton *)sender {
    
    NSLog(@"%ld", (long)sender.tag);
    
    //1. 根据按钮的tag区分运动类型
    HMSportType type = sender.tag;
    
    //2. 实例化监控控制器
    HMSportSportingViewController *sportingVc = [[HMSportSportingViewController alloc] init];
    
    //3. 设置运动类型
    sportingVc.sportType = type;
    
    //4. 显示控制器
    [self presentViewController:sportingVc animated:YES completion:nil];
    
}


@end
